/*
 * Markov.h
 *
 *  Created on: Mar 10, 2011
 *      Author: mwicat
 */

#ifndef MARKOV_H_
#define MARKOV_H_

#include <omnetpp.h>
#include <vector>
#include <boost/format.hpp>

using namespace std;
using boost::format;


class Markov {
public:
	Markov(int pMin, int pMax);
	virtual ~Markov();
	void step(int time);
	int getDelay(int time);
private:
	void initParams();
	int state;
	int stateMax;
	vector<double>::iterator lambdasIter;
	vector<double>::iterator ksisIter;
	double computeStateProb(int time);
	void nextState();
	vector<double> lambdas;
	vector<double> ksis;
	int a;
	int pktMin;
	int pktMax;
};

#endif /* MARKOV_H_ */
